ui|labelbox, ui|labelbody {
    display: block;
    float: left;
}

ui|labelbox {
    white-space: nowrap;
    .user-select(none); /* See notes in DocumentManager.js */
    max-width: 100%;


    svg {
        float: left;
    }

    ui|labelbody {
        margin-left: auto !important;
        max-width: 100%;
    }

    ui|labeltext {
        display: block;
        max-width: 100%;
        overflow: hidden;
    }

    &.toolbartext {
        margin-top: 4px;
    }

    &.flipped {
        ui|labelbody {
            background-position: 100% 0;
            padding-left: 0 !important;
        }

        svg {
            right: 8px;
            position: absolute;
        }
    }

    &.textonly {

        ui|labelbody {
            padding-left: 0;
        }

        ui|labeltext {
            padding-left: 0;
        }
    }

    &.imageonly {
        ui|labeltext {
            display: none;
        }
    }

    &.image-and-text {

        ui|labeltext {
            margin-left: 28px;
        }

        &.flipped {
            ui|labelbody {
                padding-right: 18px;
            }

            ui|labeltext {
                margin-left: 0px;
                margin-right: 6px;
            }
        }
    }

    &.graytext ui|labeltext {
        color: graytext;
    }
}


.imagesonly ui|labeltext {
    display: none;
    padding-left: 0 !important;
}


ui|toolbarbutton.hover ui|labelbox svg g.hover {
    visibility: visible;
}

ui|toolbarbutton.hover ui|labelbox svg g.default {
    visibility: hidden;
}
